/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.esi.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * esi_elec_dynamicEntity
 * @author xyde
 * @version 2020-03-09
 */
@Table(name="esi_elec_dynamic", alias="a", columns={
		@Column(name="title", attrName="title", label="title", queryType=QueryType.LIKE),
		@Column(name="content", attrName="content", label="content"),
		@Column(name="create_by", attrName="createBy", label="create_by", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="create_date", isUpdate=false, isQuery=false),
		@Column(name="update_by", attrName="updateBy", label="update_by", isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="update_date", isQuery=false),
		@Column(name="remarks", attrName="remarks", label="remarks", queryType=QueryType.LIKE),
		@Column(name="del_flag", attrName="delFlag", label="del_flag"),
		@Column(name="id", attrName="id", label="id", isUpdate=false, isQuery=false),
		@Column(name="id", attrName="id", label="id", isPK=true),
	}, orderBy="a.update_date DESC"
)
public class EsiElecDynamic extends DataEntity<EsiElecDynamic> {
	
	private static final long serialVersionUID = 1L;
	private String title;		// title
	private String content;		// content
	private String delFlag;		// del_flag
	
	public EsiElecDynamic() {
		this(null);
	}

	public EsiElecDynamic(String id){
		super(id);
	}
	
	@Length(min=0, max=200, message="title长度不能超过 200 个字符")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@Length(min=0, max=2000, message="content长度不能超过 2000 个字符")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@NotBlank(message="del_flag不能为空")
	@Length(min=0, max=1, message="del_flag长度不能超过 1 个字符")
	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}
	
}